#ifndef __UP_DMA_H
#define __UP_DMA_H

#include "UP_config.h"
#include <stdio.h>
#include <string.h>

extern void DMA_init(unsigned int dma, unsigned char channel_index,unsigned char subperipheral_select);

extern void DMA_init_with_config(unsigned int dma,
                                 unsigned char channel_index,
                                 unsigned char subperipheral_select,
                                     dma_single_data_parameter_struct dma_init_struct);

extern void on_dma_data_received(unsigned int usartx, char *data, unsigned short int length);

#endif // !__UP_DMA_H
